package com.gzhryc.net_marketing.supplier.erp.dao.enums;

public class SupplierGoodsEnum {

    public static enum State {

        PutOnTheShelf(1, "上架"),OffTheShelf(2, "下架"), NoInventory(3, "无库存");

        private Integer index;
        private String note;

        State(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public Integer getIndex() {
            return index;
        }

        public String getNote() {
            return note;
        }

        public static String note(Integer index) {
            State[] temp = State.values();
            for (int i = 0; i < temp.length; i++) {
                State item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum AuditState {

        Wait(1, "待审核"), Auditing(2, "审核中"), Success(3, "审核通过"), Error(4, "审核不通过"), Cancel(5, "取消发布");

        private Integer index;
        private String note;

        AuditState(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public Integer getIndex() {
            return index;
        }

        public String getNote() {
            return note;
        }

        public static String note(Integer index) {
            AuditState[] temp = AuditState.values();
            for (int i = 0; i < temp.length; i++) {
                AuditState item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
}
